import request from '@/utils/request'



/** 货位出库*/
export function outStorageAreaSlot(data) {
  return request({
    url: '/distribution/storageAreaSlot/outStorageAreaSlot',
    method: 'POST',
    data
  })
}

/** 入库*/
export function inStorageAreaSlot(data) {
  return request({
    url: '/distribution/storageAreaSlot/inStorageAreaSlot',
    method: 'POST',
    data
  })
}
/** 查询sku信息*/
export function getSlotSku(params) {
  return request({
    url: '/distribution/storageAreaSlot/getSlotSku',
    params
  })
}


/** 货位全部出库*/
export function outboundAllSlot(data) {
  return request({
    url: '/distribution/storageAreaSlot/outboundAllSlot',
    method: 'POST',
    data

  })
}
/** 查询货位/仓位下的SKU*/
export function getStorageAreaSlotBySearch(params) {
  return request({
    url: '/distribution/storageAreaSlot/getStorageAreaSlotBySearch',
    params
  })
}


/**  根据货架ID查询货位/仓位*/
export function getStorageAreaSlotByStorageAreaId(query) {
  return request({
    url: '/distribution/storageAreaSlot/getStorageAreaSlotByStorageAreaId',
    method: 'get',
    params: query
  })
}


/**  查询备货区货架列表-不分页*/
export function listNoPage(query) {
  return request({
    url: '/distribution/storageArea/listNoPage',
    method: 'get',
    params: query
  })
}

/**  查询备货区货架列表*/
export function listStorageArea(query) {
  return request({
    url: '/distribution/storageArea/list',
    method: 'get',
    params: query
  })
}

/**  查询备货区货架详细*/
export function getStorageArea(id) {
  return request({
    url: '/distribution/storageArea/' + id,
    method: 'get'
  })
}



/**  创建货架*/
export function createStorageArea(data) {
  return request({
    url: '/distribution/storageArea/createStorageArea',
    method: 'post',
    data: data
  })
}

/**  修改备货区货架*/
export function updateStorageArea(data) {
  return request({
    url: '/distribution/storageArea',
    method: 'put',
    data: data
  })
}

/**  删除货架*/
export function deleteStorageArea(storageAreaId) {
  return request({
    url: `/distribution/storageArea/deleteStorageArea/${storageAreaId}`,
    method: 'delete'
  })
}


